import request from '@utils/request'
// import qs from 'qs'
// 请求商品分类
const fetchCates = (params = {}) => request.get('/shop/goods/category/all', { params })
// 首页轮播
const fetchBanner = (params = {}) => request.get('/banner/list', { params })
// 请求商品列表
const fetchItems = (params = {}) => request.post('/shop/goods/list', params)
// 获取商品详情
const fetchItemDetail = (id) => request.get('/shop/goods/detail', {
  params: {
    id
  }
})
export {
  fetchCates,
  fetchBanner,
  fetchItems,
  fetchItemDetail
}
